Add optional setup wizard for first-run onboarding#1878
Draft
NatalieNobile wants to merge 1 commit into
Draft
Conversation
Adds an opt-in `./scripts/setup` wizard and `./scripts/doctor` audit under a new `setup/` Python package. The wizard streamlines first-time onboarding without modifying any SDK source files. What the wizard does (3-step picker): 1. Java + Gradle preflight — verifies JDK 8+ and the Gradle wrapper. 2. Auth credentials — inner picker for Developer Token / JWT / CCG / OAuth, then captures the right credentials and writes them to `box-config.properties` at the repo root. 3. Smoke test snippet — prints a 4-line copy-pasteable Java program that authenticates and calls `users.getUserMe()`, keyed to the chosen auth mode. Doctor is read-only and re-runs each step's check function so users can see what's wired up without rerunning the wizard. What this adds: - setup/ — Python package (5 modules, ~750 lines) - scripts/setup, scripts/doctor — bash launchers - box-config.properties.example — annotated template - WIZARD_FLOWS.md — decision tree + step reference - .gitignore: box-config.properties + box-jwt-config.json + __pycache__ What this does NOT touch: - src/ — no SDK source changes - build.gradle — no Gradle task additions - existing docs — README, CONTRIBUTING, docs/* unchanged The wizard is fully opt-in. Existing flows continue to work; users who prefer the README's manual setup steps are unaffected. Patterns used (paced output, picker-first, env injection, doctor-symmetry, idempotence, progress watchdog, self-containment) are distilled in setup-wizard-squared: https://github.com/NatalieNobile/setup-wizard-squared Tested locally: doctor reports 5 OK / 0 WARN / 0 FAIL after a complete developer-token flow. Picker grammar (1,3 / 1-3 / all / recommended / none / blank) all parse correctly. Wizard is idempotent — re-running prompts to keep or change existing values. Co-authored-by: Cursor <cursoragent@cursor.com>
NatalieNobile
added a commit
to NatalieNobile/setup-wizard-squared
that referenced
this pull request
Jun 9, 2026
Drops the customized wizard files from the box-java-sdk fork into examples/box-java-sdk/ as a reference for future agents applying the scaffold to a new repo. Keeps the scaffold/ untouched. Updates README.md and SKILL.md to: - Link to the upstream draft PR (box/box-java-sdk#1878) - Note that this example exercises every scaffold primitive except progress_watch (which the 3-step flow doesn't need) - Recommend reading the example end-to-end before applying to a new repo Files added: - examples/box-java-sdk/setup/{prompts,config,checks,wizard,doctor,__init__}.py - examples/box-java-sdk/scripts/{setup,doctor} - examples/box-java-sdk/box-config.properties.example - examples/box-java-sdk/WIZARD_FLOWS.md - examples/box-java-sdk/README.md (with provenance + customization map) Tested: scaffold + customizations import cleanly, doctor reports 5 OK / 0 WARN / 0 FAIL after a complete developer-token round-trip. Co-authored-by: Cursor <cursoragent@cursor.com>
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in setup wizard (
./scripts/setup) and read-only doctor (./scripts/doctor) under a newsetup/Python package. Streamlines first-time onboarding without modifying any SDK source files.This PR is opened as a draft — the wizard is purely additive, but it's a UX decision whether the maintainers want it shipped here vs. as a separate companion repo. Happy to take it any direction.
What the wizard does (3-step picker)
box-config.propertiesat the repo root.users.getUserMe(), keyed to the chosen auth mode.The doctor re-runs each step's check function so users can audit "what's wired up?" without rerunning the wizard.
What this adds
setup/prompts.py,config.py,checks.py,wizard.py,doctor.pyscripts/setup,scripts/doctorbox-config.properties.exampleWIZARD_FLOWS.md.gitignorebox-config.properties,box-jwt-config.json,__pycache__/What this does NOT touch
src/— zero SDK source changesbuild.gradle— no new Gradle tasksdocs/*— left aloneThe wizard is fully opt-in. Existing flows continue to work; users who prefer the README's manual setup are unaffected.
Design principles
The patterns are distilled in
setup-wizard-squared— paced output, picker-first, env injection, doctor-symmetry, idempotence, progress watchdog, self-containment. See that repo'sreference/patterns.mdfor rationale.Test plan
./scripts/doctorreports4 OK / 1 WARN / 0 FAILon a fresh clone (the WARN being "nobox-config.propertiesyet" — the wizard's job to fix)../scripts/setupwalks the picker, accepts1,2,3,1-3,all,recommended,none, blank../scripts/setupfollowed by step 2 → Developer Token → 64-char fake token →box-config.propertieswritten../scripts/doctorafter the above reports5 OK / 0 WARN / 0 FAIL../scripts/setupand picking step 2 again surfaces "Existing auth mode: Developer Token. Re-collect / change auth mode?" — idempotent.python3 -c "from setup import wizard, doctor"from repo root imports cleanly.[FAIL]with a clean install hint.Open questions for reviewers
box-java-sdk-onboardingcompanion?gradle smoketask — that's a maintainer decision. Happy to add one if wanted.